home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Resources / CDROM / AmiCDFS2 / InstallCDFS < prev    next >
Text File  |  1999-04-14  |  5KB  |  185 lines

  1. ; $VER: AmiCDFS Installer 1.3 (3.3.99) Neil Bothwick
  2. ;
  3. ; This installer is to AmiCDFS from the Amigactive cover CDs
  4.  
  5. ;;; Set paramemters and defaults
  6. (set
  7.     CD32Dev         'cd.device'
  8.     CD32Unit        '0'
  9.     SquirrelDev     'squirrelscsi.device'
  10.     SquirrelUnit    '3'
  11.     OtherDev        'scsi.device'
  12.     OtherUnit       '3'
  13.     DevNum    '0'
  14. )
  15. ;;;
  16. ;;; Check CPU
  17. (set cpu030 (> (database 'cpu') '68020'))
  18. ;;;
  19. ;;; Get device driver and unit
  20. (set DriveNum
  21.     (askchoice
  22.         (prompt 'Are you installing on a CD32, an A1200 with Squirrel (or Surf Squirrel), or a different setup?')
  23.         (help 'This information is needed to determine the correct device driver')
  24.         (choices '\x1B[2pCD32' 'Squirrel/Surf Squirrel' 'Other')
  25.         (default 2)
  26.     )
  27. )
  28. (set DevDriver
  29.     (select DriveNum
  30.         (CD32Dev)
  31.         (SquirrelDev)
  32.         (askstring
  33.             (prompt 'Enter the name of your device driver\n\nThis is CASE SENSITIVE')
  34.             (help
  35.                 (cat
  36.                     'This is the driver for your CD drives interface. '
  37.                     'It is usually something like scsi.device or atapi.device\n\n'
  38.                     'IMPORTANT: This is Case-Sensitive'
  39.                 )
  40.             )
  41.             (default OtherDev)
  42.         )
  43.     )
  44. )
  45. (set DevUnit
  46.     (select DriveNum
  47.         (CD32Unit)                  ; CD32
  48.         (askstring                  ; Squirrel
  49.             (prompt 'Enter the unit number of your CDROM drive.')
  50.             (help
  51.                 (cat
  52.                     'This will be stored in the Icon tooltypes of the file created in '
  53.                     'DEVS:DOSDrivers, you can change it if you need to by clicking on the '
  54.                     'icon once and selecting Information from the workbench icons menu'
  55.                 )
  56.             )
  57.             (default SquirrelUnit)
  58.         )
  59.         (askstring                  ; Other
  60.             (prompt 'Enter the unit number of your CDROM drive.')
  61.             (help
  62.                 (cat
  63.                     'This will be stored in the Icon tooltypes of the file created in '
  64.                     'DEVS:DOSDrivers, you can change it if you need to by clicking on the '
  65.                     'icon once and selecting Information from the workbench icons menu'
  66.                 )
  67.             )
  68.             (default OtherUnit)
  69.         )
  70.     )
  71. )
  72. ;;;
  73. ;;; Get unused name for CD drive
  74. ; Check for a mounted device
  75. (while (not (run (cat 'testdevice >NIL: CD' DevNum ':')))
  76.     (set DevNum (+ DevNum 1))
  77. )
  78. ; Check for a DEVS:DOSDrivers entry
  79. (while (exists (cat 'DEVS:DOSDrivers/CD' DevNum) (noreq))
  80.     (set DevNum (+ DevNum 1))
  81. )
  82. ; Check for a SYS:Storage/DOSDrivers entry
  83. (while (exists (cat 'SYS:Storage/DOSDrivers/CD' DevNum) (noreq))
  84.     (set DevNum (+ DevNum 1))
  85. )
  86. (set DevName (cat 'CD' DevNum))
  87. ;;;
  88. ;;; Copy files
  89. (copylib
  90.     (prompt '') (help '')
  91.     (source
  92.         (if cpu030
  93.             ('L/AmiCDFS.030')
  94.             ('L/AmiCDFS')
  95.         )
  96.     )
  97.     (dest 'L:')
  98.     (newname 'AmiCDFS')
  99. )
  100. (copylib
  101.     (prompt '') (help '')
  102.     (source 'C/Mount')
  103.     (dest 'C:')
  104. )
  105. (copylib
  106.     (prompt '') (help '')
  107.     (source 'C/SetPatch')
  108.     (dest 'C:')
  109. )
  110. (copylib
  111.     (prompt '') (help '')
  112.     (source 'C/SetCDFS')
  113.     (dest 'C:')
  114. )
  115. (copylib
  116.     (prompt '') (help '')
  117.     (source 'LIBS/wbstart.library')
  118.     (dest 'LIBS:')
  119. )
  120. (copylib
  121.     (prompt '') (help '')
  122.     (source 'Icons/def_CDDAdisk.info')
  123.     (dest 'ENVARC:sys')
  124. )
  125. ;;;
  126. ;;; Create mountfile in DEVS:
  127. (textfile
  128.     (prompt '') (help '')
  129.     (dest (cat 'DEVS:DOSDrivers/' DevName))
  130.     (append '/* $VER: CD0 2.36 (22.08.96)\n')
  131.     (append ' *\n')
  132.     (append ' * CD-ROM filesystem mount entry\n')
  133.     (append ' *\n')
  134.     (append ' * Created by Amigactive CD AmiCDFS installer\n')
  135.     (append ' */\n')
  136.     (append '\n')
  137.     (append (cat '         Device = ' DevDriver '\n'))
  138.     (append '     FileSystem = L:AmiCDFS\n')
  139.     (append '          Flags = 0\n')
  140.     (append ' BlocksPerTrack = 32\n')
  141.     (append '      BlockSize = 2048\n')
  142.     (append '       Reserved = 0\n')
  143.     (append '         LowCyl = 0\n')
  144.     (append '        HighCyl = 11000\n')
  145.     (append '       Surfaces = 1\n')
  146.     (append '        Buffers = 64\n')
  147.     (append '     BufMemType = 1\n')
  148.     (append '           Mask = 0x7fffffff\n')
  149.     (append '        GlobVec = -1\n')
  150.     (append '       Priority = 10\n')
  151.     (append '        DosType = 0x43444653\n')
  152.     (append '      StackSize = 600\n')
  153.     (append '          Mount = 1\n')
  154.     (append '\n')
  155.     (append '        Control = "LC BL=8 FB=32"\n')
  156.     (append '\n')
  157.     (append '/* Unit number is given in icon tooltype\n')
  158.     (append ' *\n')
  159.     (append ' * Control field template:\n')
  160.     (append ' *\n')
  161.     (append ' * LC=LOWERCASE/S,CS=CASESENSE/S,\n')
  162.     (append ' * HF=HFSFIRST/S,TD=TRACKDISK/S,\n')
  163.     (append ' * BL=BUFFERLINES/K/N,FB=FILEBUFFERS/K/N,\n')
  164.     (append ' * DC=DISKCHANGE/K/N,MT=MOTORTIME/K/N,\n')
  165.     (append ' * SD=STARTDELAY/K/N,TDC=TDCHANGE/S,\n')
  166.     (append ' * TOSHIBA/S,OLDMODE/S\n')
  167.     (append ' */\n')
  168. )
  169. (copyfiles
  170.     (prompt '')(help '')
  171.     (source 'CD0.info')
  172.     (dest 'DEVS:DOSDrivers')
  173.     (newname (cat DevName '.info'))
  174. )
  175. (tooltype
  176.     (prompt '') (help '')
  177.     (dest (cat 'DEVS:DOSDrivers/' DevName))
  178.     (settooltype 'UNIT' DevUnit)
  179. )
  180. ;;;
  181.  
  182. (exit (cat '\nAmiCDFS has been installed as ' DevName ':') (quiet))
  183.  
  184.  
  185.